﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Model;

namespace BLL
{
    public class UserBLL
    {
        public int AddUser(string email, string pw1, string pw2, string uname)
        {
            User user = new User();

            int Add = 0;
            if (pw1.Equals(pw2) && !pw1.Equals(""))
            {
                user.ID = 2;
                user.UserID = 2;
                user.Username = uname;
                user.Password = pw1;
                user.E_mail = email;
                UserDAL ud = new UserDAL();
                Add = ud.AddUser(user);
            }

            return Add;
        }
    }
}
